
/**
 * This is a generated class and is not intended for modification.  
 */
package valueObjects
{
import com.adobe.fiber.styles.IStyle;
import com.adobe.fiber.styles.Style;
import com.adobe.fiber.styles.StyleValidator;
import com.adobe.fiber.valueobjects.AbstractEntityMetadata;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import mx.events.ValidationResultEvent;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IModelType;
import mx.events.PropertyChangeEvent;

use namespace model_internal;

[ExcludeClass]
internal class _GratuidadDTOEntityMetadata extends com.adobe.fiber.valueobjects.AbstractEntityMetadata
{
    private static var emptyArray:Array = new Array();

    model_internal static var allProperties:Array = new Array("percenGratuidad", "precioPac", "fecInicio", "servicio", "rutp", "vigenteSN", "idServicio", "precioLista", "siglaArea", "fecFin", "idGratuidadServicio");
    model_internal static var allAssociationProperties:Array = new Array();
    model_internal static var allRequiredProperties:Array = new Array("percenGratuidad", "precioPac", "fecInicio", "servicio", "rutp", "vigenteSN", "idServicio", "precioLista", "siglaArea", "fecFin", "idGratuidadServicio");
    model_internal static var allAlwaysAvailableProperties:Array = new Array("percenGratuidad", "precioPac", "fecInicio", "servicio", "rutp", "vigenteSN", "idServicio", "precioLista", "siglaArea", "fecFin", "idGratuidadServicio");
    model_internal static var guardedProperties:Array = new Array();
    model_internal static var dataProperties:Array = new Array("percenGratuidad", "precioPac", "fecInicio", "servicio", "rutp", "vigenteSN", "idServicio", "precioLista", "siglaArea", "fecFin", "idGratuidadServicio");
    model_internal static var sourceProperties:Array = emptyArray
    model_internal static var nonDerivedProperties:Array = new Array("percenGratuidad", "precioPac", "fecInicio", "servicio", "rutp", "vigenteSN", "idServicio", "precioLista", "siglaArea", "fecFin", "idGratuidadServicio");
    model_internal static var derivedProperties:Array = new Array();
    model_internal static var collectionProperties:Array = new Array();
    model_internal static var collectionBaseMap:Object;
    model_internal static var entityName:String = "GratuidadDTO";
    model_internal static var dependentsOnMap:Object;
    model_internal static var dependedOnServices:Array = new Array();
    model_internal static var propertyTypeMap:Object;

    
    model_internal var _percenGratuidadIsValid:Boolean;
    model_internal var _percenGratuidadValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _percenGratuidadIsValidCacheInitialized:Boolean = false;
    model_internal var _percenGratuidadValidationFailureMessages:Array;
    
    model_internal var _precioPacIsValid:Boolean;
    model_internal var _precioPacValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _precioPacIsValidCacheInitialized:Boolean = false;
    model_internal var _precioPacValidationFailureMessages:Array;
    
    model_internal var _fecInicioIsValid:Boolean;
    model_internal var _fecInicioValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _fecInicioIsValidCacheInitialized:Boolean = false;
    model_internal var _fecInicioValidationFailureMessages:Array;
    
    model_internal var _servicioIsValid:Boolean;
    model_internal var _servicioValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _servicioIsValidCacheInitialized:Boolean = false;
    model_internal var _servicioValidationFailureMessages:Array;
    
    model_internal var _rutpIsValid:Boolean;
    model_internal var _rutpValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _rutpIsValidCacheInitialized:Boolean = false;
    model_internal var _rutpValidationFailureMessages:Array;
    
    model_internal var _vigenteSNIsValid:Boolean;
    model_internal var _vigenteSNValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _vigenteSNIsValidCacheInitialized:Boolean = false;
    model_internal var _vigenteSNValidationFailureMessages:Array;
    
    model_internal var _idServicioIsValid:Boolean;
    model_internal var _idServicioValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _idServicioIsValidCacheInitialized:Boolean = false;
    model_internal var _idServicioValidationFailureMessages:Array;
    
    model_internal var _precioListaIsValid:Boolean;
    model_internal var _precioListaValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _precioListaIsValidCacheInitialized:Boolean = false;
    model_internal var _precioListaValidationFailureMessages:Array;
    
    model_internal var _siglaAreaIsValid:Boolean;
    model_internal var _siglaAreaValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _siglaAreaIsValidCacheInitialized:Boolean = false;
    model_internal var _siglaAreaValidationFailureMessages:Array;
    
    model_internal var _fecFinIsValid:Boolean;
    model_internal var _fecFinValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _fecFinIsValidCacheInitialized:Boolean = false;
    model_internal var _fecFinValidationFailureMessages:Array;
    
    model_internal var _idGratuidadServicioIsValid:Boolean;
    model_internal var _idGratuidadServicioValidator:com.adobe.fiber.styles.StyleValidator;
    model_internal var _idGratuidadServicioIsValidCacheInitialized:Boolean = false;
    model_internal var _idGratuidadServicioValidationFailureMessages:Array;

    model_internal var _instance:_Super_GratuidadDTO;
    model_internal static var _nullStyle:com.adobe.fiber.styles.Style = new com.adobe.fiber.styles.Style();

    public function _GratuidadDTOEntityMetadata(value : _Super_GratuidadDTO)
    {
        // initialize property maps
        if (model_internal::dependentsOnMap == null)
        {
            // dependents map
            model_internal::dependentsOnMap = new Object();
            model_internal::dependentsOnMap["percenGratuidad"] = new Array();
            model_internal::dependentsOnMap["precioPac"] = new Array();
            model_internal::dependentsOnMap["fecInicio"] = new Array();
            model_internal::dependentsOnMap["servicio"] = new Array();
            model_internal::dependentsOnMap["rutp"] = new Array();
            model_internal::dependentsOnMap["vigenteSN"] = new Array();
            model_internal::dependentsOnMap["idServicio"] = new Array();
            model_internal::dependentsOnMap["precioLista"] = new Array();
            model_internal::dependentsOnMap["siglaArea"] = new Array();
            model_internal::dependentsOnMap["fecFin"] = new Array();
            model_internal::dependentsOnMap["idGratuidadServicio"] = new Array();

            // collection base map
            model_internal::collectionBaseMap = new Object();
        }

        // Property type Map
        model_internal::propertyTypeMap = new Object();
        model_internal::propertyTypeMap["percenGratuidad"] = "String";
        model_internal::propertyTypeMap["precioPac"] = "String";
        model_internal::propertyTypeMap["fecInicio"] = "String";
        model_internal::propertyTypeMap["servicio"] = "String";
        model_internal::propertyTypeMap["rutp"] = "String";
        model_internal::propertyTypeMap["vigenteSN"] = "String";
        model_internal::propertyTypeMap["idServicio"] = "String";
        model_internal::propertyTypeMap["precioLista"] = "String";
        model_internal::propertyTypeMap["siglaArea"] = "String";
        model_internal::propertyTypeMap["fecFin"] = "String";
        model_internal::propertyTypeMap["idGratuidadServicio"] = "String";

        model_internal::_instance = value;
        model_internal::_percenGratuidadValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPercenGratuidad);
        model_internal::_percenGratuidadValidator.required = true;
        model_internal::_percenGratuidadValidator.requiredFieldError = "percenGratuidad is required";
        //model_internal::_percenGratuidadValidator.source = model_internal::_instance;
        //model_internal::_percenGratuidadValidator.property = "percenGratuidad";
        model_internal::_precioPacValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPrecioPac);
        model_internal::_precioPacValidator.required = true;
        model_internal::_precioPacValidator.requiredFieldError = "precioPac is required";
        //model_internal::_precioPacValidator.source = model_internal::_instance;
        //model_internal::_precioPacValidator.property = "precioPac";
        model_internal::_fecInicioValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFecInicio);
        model_internal::_fecInicioValidator.required = true;
        model_internal::_fecInicioValidator.requiredFieldError = "fecInicio is required";
        //model_internal::_fecInicioValidator.source = model_internal::_instance;
        //model_internal::_fecInicioValidator.property = "fecInicio";
        model_internal::_servicioValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForServicio);
        model_internal::_servicioValidator.required = true;
        model_internal::_servicioValidator.requiredFieldError = "servicio is required";
        //model_internal::_servicioValidator.source = model_internal::_instance;
        //model_internal::_servicioValidator.property = "servicio";
        model_internal::_rutpValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForRutp);
        model_internal::_rutpValidator.required = true;
        model_internal::_rutpValidator.requiredFieldError = "rutp is required";
        //model_internal::_rutpValidator.source = model_internal::_instance;
        //model_internal::_rutpValidator.property = "rutp";
        model_internal::_vigenteSNValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForVigenteSN);
        model_internal::_vigenteSNValidator.required = true;
        model_internal::_vigenteSNValidator.requiredFieldError = "vigenteSN is required";
        //model_internal::_vigenteSNValidator.source = model_internal::_instance;
        //model_internal::_vigenteSNValidator.property = "vigenteSN";
        model_internal::_idServicioValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForIdServicio);
        model_internal::_idServicioValidator.required = true;
        model_internal::_idServicioValidator.requiredFieldError = "idServicio is required";
        //model_internal::_idServicioValidator.source = model_internal::_instance;
        //model_internal::_idServicioValidator.property = "idServicio";
        model_internal::_precioListaValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForPrecioLista);
        model_internal::_precioListaValidator.required = true;
        model_internal::_precioListaValidator.requiredFieldError = "precioLista is required";
        //model_internal::_precioListaValidator.source = model_internal::_instance;
        //model_internal::_precioListaValidator.property = "precioLista";
        model_internal::_siglaAreaValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForSiglaArea);
        model_internal::_siglaAreaValidator.required = true;
        model_internal::_siglaAreaValidator.requiredFieldError = "siglaArea is required";
        //model_internal::_siglaAreaValidator.source = model_internal::_instance;
        //model_internal::_siglaAreaValidator.property = "siglaArea";
        model_internal::_fecFinValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForFecFin);
        model_internal::_fecFinValidator.required = true;
        model_internal::_fecFinValidator.requiredFieldError = "fecFin is required";
        //model_internal::_fecFinValidator.source = model_internal::_instance;
        //model_internal::_fecFinValidator.property = "fecFin";
        model_internal::_idGratuidadServicioValidator = new StyleValidator(model_internal::_instance.model_internal::_doValidationForIdGratuidadServicio);
        model_internal::_idGratuidadServicioValidator.required = true;
        model_internal::_idGratuidadServicioValidator.requiredFieldError = "idGratuidadServicio is required";
        //model_internal::_idGratuidadServicioValidator.source = model_internal::_instance;
        //model_internal::_idGratuidadServicioValidator.property = "idGratuidadServicio";
    }

    override public function getEntityName():String
    {
        return model_internal::entityName;
    }

    override public function getProperties():Array
    {
        return model_internal::allProperties;
    }

    override public function getAssociationProperties():Array
    {
        return model_internal::allAssociationProperties;
    }

    override public function getRequiredProperties():Array
    {
         return model_internal::allRequiredProperties;   
    }

    override public function getDataProperties():Array
    {
        return model_internal::dataProperties;
    }

    public function getSourceProperties():Array
    {
        return model_internal::sourceProperties;
    }

    public function getNonDerivedProperties():Array
    {
        return model_internal::nonDerivedProperties;
    }

    override public function getGuardedProperties():Array
    {
        return model_internal::guardedProperties;
    }

    override public function getUnguardedProperties():Array
    {
        return model_internal::allAlwaysAvailableProperties;
    }

    override public function getDependants(propertyName:String):Array
    {
       if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a data property of entity GratuidadDTO");
            
       return model_internal::dependentsOnMap[propertyName] as Array;  
    }

    override public function getDependedOnServices():Array
    {
        return model_internal::dependedOnServices;
    }

    override public function getCollectionProperties():Array
    {
        return model_internal::collectionProperties;
    }

    override public function getCollectionBase(propertyName:String):String
    {
        if (model_internal::collectionProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a collection property of entity GratuidadDTO");

        return model_internal::collectionBaseMap[propertyName];
    }
    
    override public function getPropertyType(propertyName:String):String
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
            throw new Error(propertyName + " is not a property of GratuidadDTO");

        return model_internal::propertyTypeMap[propertyName];
    }

    override public function getAvailableProperties():com.adobe.fiber.valueobjects.IPropertyIterator
    {
        return new com.adobe.fiber.valueobjects.AvailablePropertyIterator(this);
    }

    override public function getValue(propertyName:String):*
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity GratuidadDTO");
        }

        return model_internal::_instance[propertyName];
    }

    override public function setValue(propertyName:String, value:*):void
    {
        if (model_internal::nonDerivedProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " is not a modifiable property of entity GratuidadDTO");
        }

        model_internal::_instance[propertyName] = value;
    }

    override public function getMappedByProperty(associationProperty:String):String
    {
        switch(associationProperty)
        {
            default:
            {
                return null;
            }
        }
    }

    override public function getPropertyLength(propertyName:String):int
    {
        switch(propertyName)
        {
            default:
            {
                return 0;
            }
        }
    }

    override public function isAvailable(propertyName:String):Boolean
    {
        if (model_internal::allProperties.indexOf(propertyName) == -1)
        {
            throw new Error(propertyName + " does not exist for entity GratuidadDTO");
        }

        if (model_internal::allAlwaysAvailableProperties.indexOf(propertyName) != -1)
        {
            return true;
        }

        switch(propertyName)
        {
            default:
            {
                return true;
            }
        }
    }

    override public function getIdentityMap():Object
    {
        var returnMap:Object = new Object();

        return returnMap;
    }

    [Bindable(event="propertyChange")]
    override public function get invalidConstraints():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_invalidConstraints;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_invalidConstraints;        
        }
    }

    [Bindable(event="propertyChange")]
    override public function get validationFailureMessages():Array
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_validationFailureMessages;
        }
    }

    override public function getDependantInvalidConstraints(propertyName:String):Array
    {
        var dependants:Array = getDependants(propertyName);
        if (dependants.length == 0)
        {
            return emptyArray;
        }

        var currentlyInvalid:Array = invalidConstraints;
        if (currentlyInvalid.length == 0)
        {
            return emptyArray;
        }

        var filterFunc:Function = function(element:*, index:int, arr:Array):Boolean
        {
            return dependants.indexOf(element) > -1;
        }

        return currentlyInvalid.filter(filterFunc);
    }

    /**
     * isValid
     */
    [Bindable(event="propertyChange")] 
    public function get isValid() : Boolean
    {
        if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
        {
            return model_internal::_instance.model_internal::_isValid;
        }
        else
        {
            // recalculate isValid
            model_internal::_instance.model_internal::_isValid = model_internal::_instance.model_internal::calculateIsValid();
            return model_internal::_instance.model_internal::_isValid;
        }
    }

    [Bindable(event="propertyChange")]
    public function get isPercenGratuidadAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPrecioPacAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFecInicioAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isServicioAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isRutpAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isVigenteSNAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isIdServicioAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isPrecioListaAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isSiglaAreaAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isFecFinAvailable():Boolean
    {
        return true;
    }

    [Bindable(event="propertyChange")]
    public function get isIdGratuidadServicioAvailable():Boolean
    {
        return true;
    }


    /**
     * derived property recalculation
     */
    public function invalidateDependentOnPercenGratuidad():void
    {
        if (model_internal::_percenGratuidadIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPercenGratuidad = null;
            model_internal::calculatePercenGratuidadIsValid();
        }
    }
    public function invalidateDependentOnPrecioPac():void
    {
        if (model_internal::_precioPacIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPrecioPac = null;
            model_internal::calculatePrecioPacIsValid();
        }
    }
    public function invalidateDependentOnFecInicio():void
    {
        if (model_internal::_fecInicioIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFecInicio = null;
            model_internal::calculateFecInicioIsValid();
        }
    }
    public function invalidateDependentOnServicio():void
    {
        if (model_internal::_servicioIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfServicio = null;
            model_internal::calculateServicioIsValid();
        }
    }
    public function invalidateDependentOnRutp():void
    {
        if (model_internal::_rutpIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfRutp = null;
            model_internal::calculateRutpIsValid();
        }
    }
    public function invalidateDependentOnVigenteSN():void
    {
        if (model_internal::_vigenteSNIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfVigenteSN = null;
            model_internal::calculateVigenteSNIsValid();
        }
    }
    public function invalidateDependentOnIdServicio():void
    {
        if (model_internal::_idServicioIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfIdServicio = null;
            model_internal::calculateIdServicioIsValid();
        }
    }
    public function invalidateDependentOnPrecioLista():void
    {
        if (model_internal::_precioListaIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfPrecioLista = null;
            model_internal::calculatePrecioListaIsValid();
        }
    }
    public function invalidateDependentOnSiglaArea():void
    {
        if (model_internal::_siglaAreaIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfSiglaArea = null;
            model_internal::calculateSiglaAreaIsValid();
        }
    }
    public function invalidateDependentOnFecFin():void
    {
        if (model_internal::_fecFinIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfFecFin = null;
            model_internal::calculateFecFinIsValid();
        }
    }
    public function invalidateDependentOnIdGratuidadServicio():void
    {
        if (model_internal::_idGratuidadServicioIsValidCacheInitialized )
        {
            model_internal::_instance.model_internal::_doValidationCacheOfIdGratuidadServicio = null;
            model_internal::calculateIdGratuidadServicioIsValid();
        }
    }

    model_internal function fireChangeEvent(propertyName:String, oldValue:Object, newValue:Object):void
    {
        this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, propertyName, oldValue, newValue));
    }

    [Bindable(event="propertyChange")]   
    public function get percenGratuidadStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get percenGratuidadValidator() : StyleValidator
    {
        return model_internal::_percenGratuidadValidator;
    }

    model_internal function set _percenGratuidadIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_percenGratuidadIsValid;         
        if (oldValue !== value)
        {
            model_internal::_percenGratuidadIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "percenGratuidadIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get percenGratuidadIsValid():Boolean
    {
        if (!model_internal::_percenGratuidadIsValidCacheInitialized)
        {
            model_internal::calculatePercenGratuidadIsValid();
        }

        return model_internal::_percenGratuidadIsValid;
    }

    model_internal function calculatePercenGratuidadIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_percenGratuidadValidator.validate(model_internal::_instance.percenGratuidad)
        model_internal::_percenGratuidadIsValid_der = (valRes.results == null);
        model_internal::_percenGratuidadIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::percenGratuidadValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::percenGratuidadValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get percenGratuidadValidationFailureMessages():Array
    {
        if (model_internal::_percenGratuidadValidationFailureMessages == null)
            model_internal::calculatePercenGratuidadIsValid();

        return _percenGratuidadValidationFailureMessages;
    }

    model_internal function set percenGratuidadValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_percenGratuidadValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_percenGratuidadValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "percenGratuidadValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get precioPacStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get precioPacValidator() : StyleValidator
    {
        return model_internal::_precioPacValidator;
    }

    model_internal function set _precioPacIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_precioPacIsValid;         
        if (oldValue !== value)
        {
            model_internal::_precioPacIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "precioPacIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get precioPacIsValid():Boolean
    {
        if (!model_internal::_precioPacIsValidCacheInitialized)
        {
            model_internal::calculatePrecioPacIsValid();
        }

        return model_internal::_precioPacIsValid;
    }

    model_internal function calculatePrecioPacIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_precioPacValidator.validate(model_internal::_instance.precioPac)
        model_internal::_precioPacIsValid_der = (valRes.results == null);
        model_internal::_precioPacIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::precioPacValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::precioPacValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get precioPacValidationFailureMessages():Array
    {
        if (model_internal::_precioPacValidationFailureMessages == null)
            model_internal::calculatePrecioPacIsValid();

        return _precioPacValidationFailureMessages;
    }

    model_internal function set precioPacValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_precioPacValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_precioPacValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "precioPacValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get fecInicioStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get fecInicioValidator() : StyleValidator
    {
        return model_internal::_fecInicioValidator;
    }

    model_internal function set _fecInicioIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_fecInicioIsValid;         
        if (oldValue !== value)
        {
            model_internal::_fecInicioIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecInicioIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get fecInicioIsValid():Boolean
    {
        if (!model_internal::_fecInicioIsValidCacheInitialized)
        {
            model_internal::calculateFecInicioIsValid();
        }

        return model_internal::_fecInicioIsValid;
    }

    model_internal function calculateFecInicioIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_fecInicioValidator.validate(model_internal::_instance.fecInicio)
        model_internal::_fecInicioIsValid_der = (valRes.results == null);
        model_internal::_fecInicioIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::fecInicioValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::fecInicioValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get fecInicioValidationFailureMessages():Array
    {
        if (model_internal::_fecInicioValidationFailureMessages == null)
            model_internal::calculateFecInicioIsValid();

        return _fecInicioValidationFailureMessages;
    }

    model_internal function set fecInicioValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_fecInicioValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_fecInicioValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecInicioValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get servicioStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get servicioValidator() : StyleValidator
    {
        return model_internal::_servicioValidator;
    }

    model_internal function set _servicioIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_servicioIsValid;         
        if (oldValue !== value)
        {
            model_internal::_servicioIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "servicioIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get servicioIsValid():Boolean
    {
        if (!model_internal::_servicioIsValidCacheInitialized)
        {
            model_internal::calculateServicioIsValid();
        }

        return model_internal::_servicioIsValid;
    }

    model_internal function calculateServicioIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_servicioValidator.validate(model_internal::_instance.servicio)
        model_internal::_servicioIsValid_der = (valRes.results == null);
        model_internal::_servicioIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::servicioValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::servicioValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get servicioValidationFailureMessages():Array
    {
        if (model_internal::_servicioValidationFailureMessages == null)
            model_internal::calculateServicioIsValid();

        return _servicioValidationFailureMessages;
    }

    model_internal function set servicioValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_servicioValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_servicioValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "servicioValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get rutpStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get rutpValidator() : StyleValidator
    {
        return model_internal::_rutpValidator;
    }

    model_internal function set _rutpIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_rutpIsValid;         
        if (oldValue !== value)
        {
            model_internal::_rutpIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "rutpIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get rutpIsValid():Boolean
    {
        if (!model_internal::_rutpIsValidCacheInitialized)
        {
            model_internal::calculateRutpIsValid();
        }

        return model_internal::_rutpIsValid;
    }

    model_internal function calculateRutpIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_rutpValidator.validate(model_internal::_instance.rutp)
        model_internal::_rutpIsValid_der = (valRes.results == null);
        model_internal::_rutpIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::rutpValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::rutpValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get rutpValidationFailureMessages():Array
    {
        if (model_internal::_rutpValidationFailureMessages == null)
            model_internal::calculateRutpIsValid();

        return _rutpValidationFailureMessages;
    }

    model_internal function set rutpValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_rutpValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_rutpValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "rutpValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get vigenteSNStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get vigenteSNValidator() : StyleValidator
    {
        return model_internal::_vigenteSNValidator;
    }

    model_internal function set _vigenteSNIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_vigenteSNIsValid;         
        if (oldValue !== value)
        {
            model_internal::_vigenteSNIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vigenteSNIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get vigenteSNIsValid():Boolean
    {
        if (!model_internal::_vigenteSNIsValidCacheInitialized)
        {
            model_internal::calculateVigenteSNIsValid();
        }

        return model_internal::_vigenteSNIsValid;
    }

    model_internal function calculateVigenteSNIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_vigenteSNValidator.validate(model_internal::_instance.vigenteSN)
        model_internal::_vigenteSNIsValid_der = (valRes.results == null);
        model_internal::_vigenteSNIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::vigenteSNValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::vigenteSNValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get vigenteSNValidationFailureMessages():Array
    {
        if (model_internal::_vigenteSNValidationFailureMessages == null)
            model_internal::calculateVigenteSNIsValid();

        return _vigenteSNValidationFailureMessages;
    }

    model_internal function set vigenteSNValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_vigenteSNValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_vigenteSNValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "vigenteSNValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get idServicioStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get idServicioValidator() : StyleValidator
    {
        return model_internal::_idServicioValidator;
    }

    model_internal function set _idServicioIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_idServicioIsValid;         
        if (oldValue !== value)
        {
            model_internal::_idServicioIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "idServicioIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get idServicioIsValid():Boolean
    {
        if (!model_internal::_idServicioIsValidCacheInitialized)
        {
            model_internal::calculateIdServicioIsValid();
        }

        return model_internal::_idServicioIsValid;
    }

    model_internal function calculateIdServicioIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_idServicioValidator.validate(model_internal::_instance.idServicio)
        model_internal::_idServicioIsValid_der = (valRes.results == null);
        model_internal::_idServicioIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::idServicioValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::idServicioValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get idServicioValidationFailureMessages():Array
    {
        if (model_internal::_idServicioValidationFailureMessages == null)
            model_internal::calculateIdServicioIsValid();

        return _idServicioValidationFailureMessages;
    }

    model_internal function set idServicioValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_idServicioValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_idServicioValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "idServicioValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get precioListaStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get precioListaValidator() : StyleValidator
    {
        return model_internal::_precioListaValidator;
    }

    model_internal function set _precioListaIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_precioListaIsValid;         
        if (oldValue !== value)
        {
            model_internal::_precioListaIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "precioListaIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get precioListaIsValid():Boolean
    {
        if (!model_internal::_precioListaIsValidCacheInitialized)
        {
            model_internal::calculatePrecioListaIsValid();
        }

        return model_internal::_precioListaIsValid;
    }

    model_internal function calculatePrecioListaIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_precioListaValidator.validate(model_internal::_instance.precioLista)
        model_internal::_precioListaIsValid_der = (valRes.results == null);
        model_internal::_precioListaIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::precioListaValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::precioListaValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get precioListaValidationFailureMessages():Array
    {
        if (model_internal::_precioListaValidationFailureMessages == null)
            model_internal::calculatePrecioListaIsValid();

        return _precioListaValidationFailureMessages;
    }

    model_internal function set precioListaValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_precioListaValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_precioListaValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "precioListaValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get siglaAreaStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get siglaAreaValidator() : StyleValidator
    {
        return model_internal::_siglaAreaValidator;
    }

    model_internal function set _siglaAreaIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_siglaAreaIsValid;         
        if (oldValue !== value)
        {
            model_internal::_siglaAreaIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "siglaAreaIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get siglaAreaIsValid():Boolean
    {
        if (!model_internal::_siglaAreaIsValidCacheInitialized)
        {
            model_internal::calculateSiglaAreaIsValid();
        }

        return model_internal::_siglaAreaIsValid;
    }

    model_internal function calculateSiglaAreaIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_siglaAreaValidator.validate(model_internal::_instance.siglaArea)
        model_internal::_siglaAreaIsValid_der = (valRes.results == null);
        model_internal::_siglaAreaIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::siglaAreaValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::siglaAreaValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get siglaAreaValidationFailureMessages():Array
    {
        if (model_internal::_siglaAreaValidationFailureMessages == null)
            model_internal::calculateSiglaAreaIsValid();

        return _siglaAreaValidationFailureMessages;
    }

    model_internal function set siglaAreaValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_siglaAreaValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_siglaAreaValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "siglaAreaValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get fecFinStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get fecFinValidator() : StyleValidator
    {
        return model_internal::_fecFinValidator;
    }

    model_internal function set _fecFinIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_fecFinIsValid;         
        if (oldValue !== value)
        {
            model_internal::_fecFinIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecFinIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get fecFinIsValid():Boolean
    {
        if (!model_internal::_fecFinIsValidCacheInitialized)
        {
            model_internal::calculateFecFinIsValid();
        }

        return model_internal::_fecFinIsValid;
    }

    model_internal function calculateFecFinIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_fecFinValidator.validate(model_internal::_instance.fecFin)
        model_internal::_fecFinIsValid_der = (valRes.results == null);
        model_internal::_fecFinIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::fecFinValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::fecFinValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get fecFinValidationFailureMessages():Array
    {
        if (model_internal::_fecFinValidationFailureMessages == null)
            model_internal::calculateFecFinIsValid();

        return _fecFinValidationFailureMessages;
    }

    model_internal function set fecFinValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_fecFinValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_fecFinValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "fecFinValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }

    [Bindable(event="propertyChange")]   
    public function get idGratuidadServicioStyle():com.adobe.fiber.styles.Style
    {
        return model_internal::_nullStyle;
    }

    public function get idGratuidadServicioValidator() : StyleValidator
    {
        return model_internal::_idGratuidadServicioValidator;
    }

    model_internal function set _idGratuidadServicioIsValid_der(value:Boolean):void 
    {
        var oldValue:Boolean = model_internal::_idGratuidadServicioIsValid;         
        if (oldValue !== value)
        {
            model_internal::_idGratuidadServicioIsValid = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "idGratuidadServicioIsValid", oldValue, value));
        }                             
    }

    [Bindable(event="propertyChange")]
    public function get idGratuidadServicioIsValid():Boolean
    {
        if (!model_internal::_idGratuidadServicioIsValidCacheInitialized)
        {
            model_internal::calculateIdGratuidadServicioIsValid();
        }

        return model_internal::_idGratuidadServicioIsValid;
    }

    model_internal function calculateIdGratuidadServicioIsValid():void
    {
        var valRes:ValidationResultEvent = model_internal::_idGratuidadServicioValidator.validate(model_internal::_instance.idGratuidadServicio)
        model_internal::_idGratuidadServicioIsValid_der = (valRes.results == null);
        model_internal::_idGratuidadServicioIsValidCacheInitialized = true;
        if (valRes.results == null)
             model_internal::idGratuidadServicioValidationFailureMessages_der = emptyArray;
        else
        {
            var _valFailures:Array = new Array();
            for (var a:int = 0 ; a<valRes.results.length ; a++)
            {
                _valFailures.push(valRes.results[a].errorMessage);
            }
            model_internal::idGratuidadServicioValidationFailureMessages_der = _valFailures;
        }
    }

    [Bindable(event="propertyChange")]
    public function get idGratuidadServicioValidationFailureMessages():Array
    {
        if (model_internal::_idGratuidadServicioValidationFailureMessages == null)
            model_internal::calculateIdGratuidadServicioIsValid();

        return _idGratuidadServicioValidationFailureMessages;
    }

    model_internal function set idGratuidadServicioValidationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_idGratuidadServicioValidationFailureMessages;

        var needUpdate : Boolean = false;
        if (oldValue == null)
            needUpdate = true;
    
        // avoid firing the event when old and new value are different empty arrays
        if (!needUpdate && (oldValue !== value && (oldValue.length > 0 || value.length > 0)))
        {
            if (oldValue.length == value.length)
            {
                for (var a:int=0; a < oldValue.length; a++)
                {
                    if (oldValue[a] !== value[a])
                    {
                        needUpdate = true;
                        break;
                    }
                }
            }
            else
            {
                needUpdate = true;
            }
        }

        if (needUpdate)
        {
            model_internal::_idGratuidadServicioValidationFailureMessages = value;   
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "idGratuidadServicioValidationFailureMessages", oldValue, value));
            // Only execute calculateIsValid if it has been called before, to update the validationFailureMessages for
            // the entire entity.
            if (model_internal::_instance.model_internal::_cacheInitialized_isValid)
            {
                model_internal::_instance.model_internal::isValid_der = model_internal::_instance.model_internal::calculateIsValid();
            }
        }
    }


     /**
     * 
     * @inheritDoc 
     */ 
     override public function getStyle(propertyName:String):com.adobe.fiber.styles.IStyle
     {
         switch(propertyName)
         {
            default:
            {
                return null;
            }
         }
     }
     
     /**
     * 
     * @inheritDoc 
     *  
     */  
     override public function getPropertyValidationFailureMessages(propertyName:String):Array
     {
         switch(propertyName)
         {
            case("percenGratuidad"):
            {
                return percenGratuidadValidationFailureMessages;
            }
            case("precioPac"):
            {
                return precioPacValidationFailureMessages;
            }
            case("fecInicio"):
            {
                return fecInicioValidationFailureMessages;
            }
            case("servicio"):
            {
                return servicioValidationFailureMessages;
            }
            case("rutp"):
            {
                return rutpValidationFailureMessages;
            }
            case("vigenteSN"):
            {
                return vigenteSNValidationFailureMessages;
            }
            case("idServicio"):
            {
                return idServicioValidationFailureMessages;
            }
            case("precioLista"):
            {
                return precioListaValidationFailureMessages;
            }
            case("siglaArea"):
            {
                return siglaAreaValidationFailureMessages;
            }
            case("fecFin"):
            {
                return fecFinValidationFailureMessages;
            }
            case("idGratuidadServicio"):
            {
                return idGratuidadServicioValidationFailureMessages;
            }
            default:
            {
                return emptyArray;
            }
         }
     }

}

}
